package org.example.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class KafkaConfig {

    @Bean
    public NewTopic newTopic() {
        // 创建一个名为heTopic的Topic并设置分区数为5，分区副本数为1
        return new NewTopic("helloTopic", 5, (short) 1);
    }

}
